const sequelize = require('./db');
const { DataTypes } = require('sequelize');

const Student = sequelize.define('Student', {
    name: {
        type: DataTypes.STRING,
        allowNull: false
    },
    birthday: {
        type: DataTypes.DATE
    },
    sex: {
        type: DataTypes.BOOLEAN
    },
    mobile: {
        type: DataTypes.STRING
    },
    age: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    ClassId: {
        type: DataTypes.INTEGER,
        allowNull: false // 确保允许插入值
    }
}, {
    createdAt: false,
    updatedAt: false,
    paranoid: true
})

module.exports = Student;